<?php
abstract class Zen_Dependency extends Zen_Base
{
    protected $_Zen_Dependency = array();

    protected $_dependency = null;

    //配置结束后，为$_dependency变量赋值
    //@todo Zen::dependency参数有问题
    protected function _postConfig()
    {
        parent::_postConfig();
        if (!$this->_dependency) {
            $this->_dependency = Zen::dependency(
                $this->_config['dependency'], null);
        }
    }
    //获得依赖对象的所有Public方法
    public function __call($method, $arg_array)
    {
        return call_user_func_array(array($this->_dependency, $method),
         $arg_array);
    }
}